{layout name="layout" $title/}
<div class="col-md-9">
  <form class="form-horizontal" method="post" class="post" action="{:url('office/document/index')}">
    <div class="panel panel-default panel-success">
      <div class="panel-heading">
        <h3 class="panel-title">筛选框</h3>
      </div>
      <div class="panel-body">
        <div class="form-group">
          <label for="inputEmail3" class="col-md-2 control-label">是否某事情</label>
          <div class="col-md-9">
            <label class="radio-inline">
              <input type="radio" name="is_sth" id="inlineRadio1" value="0" {present name="query.is_sth"}{$query.is_sth==='0'?="checked"}{/present}> 否
            </label>
            <label class="radio-inline">
              <input type="radio" name="is_sth" id="inlineRadio2" value="1" {present name="query.is_sth"}{$query.is_sth==='1'?="checked"}{/present}>是
            </label>
          </div>
        </div>
        <div class="form-group">
          <label for="inputPassword3" class="col-md-2 control-label">某物数量</label>
          <div class="col-md-9">
            <input type="text" name='sth_num' class="form-control" id="inputPassword3" placeholder="number" value={present name="query.sth_num"}{$query.sth_num}{/present}>
          </div>
        </div>
        <div class="form-group">
          <label for="inputPassword3" class="col-md-2 control-label">开始时间</label>
          <div class="col-md-4">
            <input type="date" name='start_time_head' class="form-control" id="inputPassword3" placeholder="number" value="">
          </div>
          <div class="col-md-4">
            <input type="date" name='start_time_tail' class="form-control" id="inputPassword3" placeholder="number" value="">
          </div>
        </div>
        <div class="form-group">
          <label for="inputPassword3" class="col-md-2 control-label">结束时间</label>
          <div class="col-md-4">
            <input type="date" name='end_time_head' class="form-control" id="inputPassword3" placeholder="number" value="">
          </div>
          <div class="col-md-4">
            <input type="date" name='end_time_tail' class="form-control" id="inputPassword3" placeholder="number" value="">
          </div>
        </div>
        <div class="form-group">
          <label for="inputEmail3" class="col-md-2 control-label">状态</label>
          <div class="col-md-9">
            <select name="max_static" class="form-control">
              <option value='' >--请选择--</option>
              {volist name="staticOptionList" id="option"}
                <option value="{$option.static}" {present name="query.static"}{$query.static==$option.static?="selected"}{/present}>{$option.static_title}</option>
              {/volist}
            </select>
          </div>
        </div>
        <div class="form-group">
          <div class="col-md-offset-2 col-md-9">
            <p>
              <button type="submit" name="submit" value="1" class="btn btn-success ">搜  索  <span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
              <button type="submit" name="reset" value="1" class="btn btn-primary ">清  空   <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button>
              <a class="btn btn-primary" href="{:url('office/document/create')}" class='btn'>添加设计文件  <span class="glyphicon glyphicon-th-large" aria-hidden="true"></span></a>
            </p>
          </div>
        </div>
      </div>
    </div>
    <div class="panel panel-default  panel-info">
      <div class="panel-heading">
        <h3 class="panel-title text-center">设计文件信息列表（{$count}/{$countall}）</h3>
      </div>
      <div class="panel-body">
        <div class="table-responsive">
          <table class="table table-striped .table-bordered  table-hover">
            <tr>
              <th class="">序号</td>
              <th class=""><button type="submit" name="order[code]" value="{$query.order|current=='asc'?'desc':'asc'}" class="btn btn-success btn-block">编号</button></td>
              <th class=""><button type="submit" name="order[title]" value="{$query.order|current=='asc'?'desc':'asc'}" class="btn btn-success btn-block">名称</button></td>
              <th class="">增加记录时间</td>
              <th class="">修改记录时间</td>
              <th class="">增加记录人</td>
              <th class="">是否某事物</td>
              <th class="">某物品数量</td>
              <th class="">状态</td>
              <th class="">操作</td>
            </tr>
            {volist name="list" id="document" }
            <tr>
              <td class="">{$i}</td>
              <td class="">{$document.code}</td>
              <td class="">{$document.title}</td>
              <td class="">{$document.create_time}</td>
              <td class="">{$document.update_time}</td>
              <td class="">{$document.create_name}</td>
              <td class="">{$document.is_sth}</td>
              <td class="">{$document.sth_num_unit}</td>
              <td class="">{$document.max_static_text}</td>
              <td class="">
                <a href="{:url('office/document/edit_process','id='.$document.id)}"><span class="glyphicon glyphicon-list" aria-hidden="true"></span></a>
                <a href="{:url('office/document/edit','id='.$document.id)}"><span class="glyphicon glyphicon-pencil {$document.create_code!==$Request.cookie.login_code?='hidden'}" aria-hidden="true"></span></a>
              </td>
            </tr>
            {/volist}
          </table>
            <div class="text-center"><p>{$list->render()}</p></div>
        </div>
      </div>
    </div>
  </form>
</div>